3.7 \(\int \csc ^5(e+f x) (a+b \sec ^2(e+f x)) \, dx\)

Optimal. Leaf size=81 \[ -\frac{3 (a+5 b) \tanh ^{-1}(\cos (e+f x))}{8 f}-\frac{(a+b) \cot (e+f x) \csc ^3(e+f x)}{4 f}-\frac{(3 a+7 b) \cot (e+f x) \csc (e+f x)}{8 f}+\frac{b \sec (e+f x)}{f} \]

[Out]

(-3*(a + 5*b)*ArcTanh[Cos[e + f*x]])/(8*f) - ((3*a + 7*b)*Cot[e + f*x]*Csc[e + f*x])/(8*f) - ((a + b)*Cot[e +
f*x]*Csc[e + f*x]^3)/(4*f) + (b*Sec[e + f*x])/f

________________________________________________________________________________________

Rubi [A]  time = 0.074872, antiderivative size = 81, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {4133, 456, 453, 206} \[ -\frac{3 (a+5 b) \tanh ^{-1}(\cos (e+f x))}{8 f}-\frac{(a+b) \cot (e+f x) \csc ^3(e+f x)}{4 f}-\frac{(3 a+7 b) \cot (e+f x) \csc (e+f x)}{8 f}+\frac{b \sec (e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^5*(a + b*Sec[e + f*x]^2),x]

[Out]

(-3*(a + 5*b)*ArcTanh[Cos[e + f*x]])/(8*f) - ((3*a + 7*b)*Cot[e + f*x]*Csc[e + f*x])/(8*f) - ((a + b)*Cot[e +
f*x]*Csc[e + f*x]^3)/(4*f) + (b*Sec[e + f*x])/f

Rule 4133

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = F
reeFactors[Cos[e + f*x], x]}, -Dist[ff/f, Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*(ff*x)^n)^p)/(ff*x)^(n*
p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p
]

Rule 456

Int[(x_)^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[((-a)^(m/2 - 1)*(b*c - a*d)*
x*(a + b*x^2)^(p + 1))/(2*b^(m/2 + 1)*(p + 1)), x] + Dist[1/(2*b^(m/2 + 1)*(p + 1)), Int[x^m*(a + b*x^2)^(p +
1)*ExpandToSum[2*b*(p + 1)*Together[(b^(m/2)*(c + d*x^2) - (-a)^(m/2 - 1)*(b*c - a*d)*x^(-m + 2))/(a + b*x^2)]
 - ((-a)^(m/2 - 1)*(b*c - a*d))/x^m, x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &
& ILtQ[m/2, 0] && (IntegerQ[p] || EqQ[m + 2*p + 1, 0])

Rule 453

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(c*(e*x)^(m
+ 1)*(a + b*x^n)^(p + 1))/(a*e*(m + 1)), x] + Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a*e^n*(m + 1)), In
t[(e*x)^(m + n)*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[n] ||
GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1])) &&  !ILtQ[p, -1]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \csc ^5(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{b+a x^2}{x^2 \left (1-x^2\right )^3} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{(a+b) \cot (e+f x) \csc ^3(e+f x)}{4 f}+\frac{\operatorname{Subst}\left (\int \frac{-4 b-3 (a+b) x^2}{x^2 \left (1-x^2\right )^2} \, dx,x,\cos (e+f x)\right )}{4 f}\\ &=-\frac{(3 a+7 b) \cot (e+f x) \csc (e+f x)}{8 f}-\frac{(a+b) \cot (e+f x) \csc ^3(e+f x)}{4 f}-\frac{\operatorname{Subst}\left (\int \frac{8 b+(3 a+7 b) x^2}{x^2 \left (1-x^2\right )} \, dx,x,\cos (e+f x)\right )}{8 f}\\ &=-\frac{(3 a+7 b) \cot (e+f x) \csc (e+f x)}{8 f}-\frac{(a+b) \cot (e+f x) \csc ^3(e+f x)}{4 f}+\frac{b \sec (e+f x)}{f}-\frac{(3 (a+5 b)) \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\cos (e+f x)\right )}{8 f}\\ &=-\frac{3 (a+5 b) \tanh ^{-1}(\cos (e+f x))}{8 f}-\frac{(3 a+7 b) \cot (e+f x) \csc (e+f x)}{8 f}-\frac{(a+b) \cot (e+f x) \csc ^3(e+f x)}{4 f}+\frac{b \sec (e+f x)}{f}\\ \end{align*}

Mathematica [B]  time = 1.84283, size = 198, normalized size = 2.44 \[ \frac{-(a+b) \csc ^4\left (\frac{1}{2} (e+f x)\right )-2 (3 a+7 b) \csc ^2\left (\frac{1}{2} (e+f x)\right )+\frac{-(a+b) \sec ^4\left (\frac{1}{2} (e+f x)\right )+\tan ^2\left (\frac{1}{2} (e+f x)\right ) \sec ^4\left (\frac{1}{2} (e+f x)\right ) ((3 a+7 b) \cos (e+f x)+4 (a+2 b))+2 \sec ^2\left (\frac{1}{2} (e+f x)\right ) \left (4 \cos (e+f x) \left (-3 (a+5 b) \log \left (\sin \left (\frac{1}{2} (e+f x)\right )\right )+3 (a+5 b) \log \left (\cos \left (\frac{1}{2} (e+f x)\right )\right )+8 b\right )-3 (a+13 b)\right )}{\tan ^2\left (\frac{1}{2} (e+f x)\right )-1}}{64 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]^5*(a + b*Sec[e + f*x]^2),x]

[Out]

(-2*(3*a + 7*b)*Csc[(e + f*x)/2]^2 - (a + b)*Csc[(e + f*x)/2]^4 + (2*(-3*(a + 13*b) + 4*Cos[e + f*x]*(8*b + 3*
(a + 5*b)*Log[Cos[(e + f*x)/2]] - 3*(a + 5*b)*Log[Sin[(e + f*x)/2]]))*Sec[(e + f*x)/2]^2 - (a + b)*Sec[(e + f*
x)/2]^4 + (4*(a + 2*b) + (3*a + 7*b)*Cos[e + f*x])*Sec[(e + f*x)/2]^4*Tan[(e + f*x)/2]^2)/(-1 + Tan[(e + f*x)/
2]^2))/(64*f)

________________________________________________________________________________________

Maple [A]  time = 0.049, size = 142, normalized size = 1.8 \begin{align*} -{\frac{\cot \left ( fx+e \right ) a \left ( \csc \left ( fx+e \right ) \right ) ^{3}}{4\,f}}-{\frac{3\,a\csc \left ( fx+e \right ) \cot \left ( fx+e \right ) }{8\,f}}+{\frac{3\,a\ln \left ( \csc \left ( fx+e \right ) -\cot \left ( fx+e \right ) \right ) }{8\,f}}-{\frac{b}{4\,f \left ( \sin \left ( fx+e \right ) \right ) ^{4}\cos \left ( fx+e \right ) }}-{\frac{5\,b}{8\,f \left ( \sin \left ( fx+e \right ) \right ) ^{2}\cos \left ( fx+e \right ) }}+{\frac{15\,b}{8\,f\cos \left ( fx+e \right ) }}+{\frac{15\,b\ln \left ( \csc \left ( fx+e \right ) -\cot \left ( fx+e \right ) \right ) }{8\,f}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^5*(a+b*sec(f*x+e)^2),x)

[Out]

-1/4/f*a*cot(f*x+e)*csc(f*x+e)^3-3/8/f*a*csc(f*x+e)*cot(f*x+e)+3/8/f*a*ln(csc(f*x+e)-cot(f*x+e))-1/4/f*b/sin(f
*x+e)^4/cos(f*x+e)-5/8/f*b/sin(f*x+e)^2/cos(f*x+e)+15/8/f*b/cos(f*x+e)+15/8/f*b*ln(csc(f*x+e)-cot(f*x+e))

________________________________________________________________________________________

Maxima [A]  time = 1.01691, size = 136, normalized size = 1.68 \begin{align*} -\frac{3 \,{\left (a + 5 \, b\right )} \log \left (\cos \left (f x + e\right ) + 1\right ) - 3 \,{\left (a + 5 \, b\right )} \log \left (\cos \left (f x + e\right ) - 1\right ) - \frac{2 \,{\left (3 \,{\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{4} - 5 \,{\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{2} + 8 \, b\right )}}{\cos \left (f x + e\right )^{5} - 2 \, \cos \left (f x + e\right )^{3} + \cos \left (f x + e\right )}}{16 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^5*(a+b*sec(f*x+e)^2),x, algorithm="maxima")

[Out]

-1/16*(3*(a + 5*b)*log(cos(f*x + e) + 1) - 3*(a + 5*b)*log(cos(f*x + e) - 1) - 2*(3*(a + 5*b)*cos(f*x + e)^4 -
 5*(a + 5*b)*cos(f*x + e)^2 + 8*b)/(cos(f*x + e)^5 - 2*cos(f*x + e)^3 + cos(f*x + e)))/f

________________________________________________________________________________________

Fricas [B]  time = 0.772039, size = 481, normalized size = 5.94 \begin{align*} \frac{6 \,{\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{4} - 10 \,{\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{2} - 3 \,{\left ({\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{5} - 2 \,{\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{3} +{\left (a + 5 \, b\right )} \cos \left (f x + e\right )\right )} \log \left (\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) + 3 \,{\left ({\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{5} - 2 \,{\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{3} +{\left (a + 5 \, b\right )} \cos \left (f x + e\right )\right )} \log \left (-\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) + 16 \, b}{16 \,{\left (f \cos \left (f x + e\right )^{5} - 2 \, f \cos \left (f x + e\right )^{3} + f \cos \left (f x + e\right )\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^5*(a+b*sec(f*x+e)^2),x, algorithm="fricas")

[Out]

1/16*(6*(a + 5*b)*cos(f*x + e)^4 - 10*(a + 5*b)*cos(f*x + e)^2 - 3*((a + 5*b)*cos(f*x + e)^5 - 2*(a + 5*b)*cos
(f*x + e)^3 + (a + 5*b)*cos(f*x + e))*log(1/2*cos(f*x + e) + 1/2) + 3*((a + 5*b)*cos(f*x + e)^5 - 2*(a + 5*b)*
cos(f*x + e)^3 + (a + 5*b)*cos(f*x + e))*log(-1/2*cos(f*x + e) + 1/2) + 16*b)/(f*cos(f*x + e)^5 - 2*f*cos(f*x
+ e)^3 + f*cos(f*x + e))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**5*(a+b*sec(f*x+e)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.23797, size = 379, normalized size = 4.68 \begin{align*} \frac{12 \,{\left (a + 5 \, b\right )} \log \left (-\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right ) - \frac{{\left (a + b - \frac{8 \, a{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac{16 \, b{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{18 \, a{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac{90 \, b{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) - 1\right )}^{2}} - \frac{8 \, a{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac{16 \, b{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{a{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac{b{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac{128 \, b}{\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1}}{64 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^5*(a+b*sec(f*x+e)^2),x, algorithm="giac")

[Out]

1/64*(12*(a + 5*b)*log(-(cos(f*x + e) - 1)/(cos(f*x + e) + 1)) - (a + b - 8*a*(cos(f*x + e) - 1)/(cos(f*x + e)
 + 1) - 16*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 18*a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 90*b*(co
s(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2)*(cos(f*x + e) + 1)^2/(cos(f*x + e) - 1)^2 - 8*a*(cos(f*x + e) - 1)/(co
s(f*x + e) + 1) - 16*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + b
*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 128*b/((cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 1))/f